﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GemCraftLabyrinthHelper
{
    public static class GCData
    {
        public static readonly int[] MonsterPerSummon
            = new int[] { 4, 8, 13, 19, 25, 32, 38, 44, 51 };

        public static int[] CostPerGem(double forgeSkill)
        {
            int maxGradeLevel = MonsterPerSummon.Length;
            int baseGem = (int)Math.Floor(77 * forgeSkill);
            int mergeCost = (int)Math.Round(77 * forgeSkill);

            int[] costs = new int[maxGradeLevel];

            int lastGem = baseGem;
            costs[0] = baseGem;
            for (int i = 1; i < maxGradeLevel; i++)
            {
                lastGem = (lastGem * 2) + mergeCost;
                costs[i] = lastGem;
            }

            return costs;
        }
    }

    public class CalculatedData
    {
        public CalculatedData(List<double> totalManaGain, 
            List<double> profitPerSummon,
            int[] monstersPerSummon,
            int[] costPerGem)
        {
            TotalManaGain = totalManaGain;
            ProfitPerSummon = profitPerSummon;
            MonstersPerSummon = monstersPerSummon;
            CostPerGem = costPerGem;
        }

        public List<double> TotalManaGain { get; set; }

        public List<double> ProfitPerSummon { get; set; }

        public int[] MonstersPerSummon { get; set; }

        public int[] CostPerGem { get; set; }
    }
}
